export default class Observer {
    constructor() {
        this.observers = []
    }
    add(fn) {
        if (typeof fn === 'function') {
            this.observers.push(fn);
        }
    }
    ontify(...args) {
        this.observers.forEach(observer => {
            observer.call(...args)
        })
    }
}